#include <stdio.h>
#include <string.h>
#include <stdbool.h>

char* Array[10][2] = 
{
    {"zhangsan","123"},
    {"lisi","1234"},
    {"wangwu","12345"}
};

bool Login(const char *user,const char *passwd)
{
    for(int i = 0; i < 3; i++)
    {
        if(strcmp(user,Array[i][0]) == 0 && strcmp(passwd,Array[i][1]) == 0)
        {
            return true;
        }
    }
    return false;
}

int main(int argc,char *argv[])
{
    for (int  i = 0; i < argc; i++)
    {
        printf("%s\n",argv[i]);
    }
    if(argc != 3)
    {
        printf("参数数量错误！启动失败！\n");
        return -1;
    }
    
    if(Login(argv[1],argv[2]) == true)
    {
        printf("账号密码正确！欢迎使用本系统\n");
        return 0;
    }
    else
    {
        printf("账号密码错误！退出程序！\n");
        return -1;
    }
    return 0;
}